<ul class="tab-button">
    <li><a href="javascript:void();" data="0">顶级标签</a></li>
    <?php foreach ($parents as $parent): ?>
        <li>
            <a href="javascript:void(0);" class="parent-button" data="<?php echo $parent->id; ?>">
                <?php echo $parent->value; ?>
            </a>
        </li>
    <?php endforeach; ?>
    <li class="clear"></li>
</ul>

<a href="javascript:void(0);" class="add">新增标签</a>

<table class="records">
    <thead>
        <tr>
            <th>选择</th>
            <th>父标签</th>
            <th>顺序</th>
            <th>中文标签值</th>
            <th>英文标签值</th>
            <th>操作</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="6"></td>
        </tr>
    </tfoot>
    <tbody>
        <tr><td colspan="6"></td></tr>
    </tbody>
</table>

<script id="list-template" type="text/x-jquery-tmpl">
    <tr>
        <td><input type="checkbox" name="id[]" value="${id}"/></td>
        <td>${parent_value||'顶级'}/${parent_value_en || 'top'}</td>
        <td>${order}</td>
        <td>${value}</td>
        <td>${value_en}</td>
        <td>
            <a href="javascritp:void(0);" class="edit">修改</a>
            <a href="javascritp:void(0);" class="delete">删除</a>
            <a href="javascritp:void(0);" class="order-up">上移</a>
            <a href="javascritp:void(0);" class="order-down">下移</a>
        </td>
    </tr>
</script>

<script id="form-template" type="text/x-jquery-tmpl">
    <form action="/backend/label/${action}" method="post">
        <input type="hidden" name="id" value="${id}"/>
        <input type="hidden" name="parent" value="${parent}"/>
        <div class="form">
            <label>中文</label>
            <input type="text" name="value" value="${value}"/>
        </div>
        <div class="form">
            <label>英文</label>
            <input type="text" name="value_en" value="${value_en}"/>
        </div>
        <div class="form-button">
            <input type="submit" namem="submit" value="提交"/>
        </div>
    </form>
</script>

